<%--
  Created by IntelliJ IDEA.
  User: 17237
  Date: 2023/10/27
  Time: 11:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<html>
<head>
    <title>项目工程信息表</title>
</head>
<body>

<p style="text-align: right">
   <%-- <a href="toAdd.project">新增一个项目</a>--%>
       <a href="addproject.html">新增一个项目</a>
</p>
<p>
<form method="get" action="search.project">
    <div>
       <%-- <input type="text" name="id" value="${id}" placeholder="项目编号"/>
       --%>
        <input type="text" name="projectName" value="${project2.projectName}" placeholder="项目名称查找"/>
        <input type="text" name="projectCategory" value="${project2.projectCategory}" placeholder="项目类型查找"/>
        <input type="text" name="isEvaluated" value="${project2.isEvaluated}" placeholder="项目抽签状态查找"/>
        <input type="text" name="registerAddress" value="${project2.registerAddress}" placeholder="报道地址查找"/>
<%--        <input type="text" name="status" value="${project.status}" placeholder="项目完成状态查找"/>--%>
<%--        入职时间：从<input type="date" name="start" value='<fmt:formatDate value="${start}" pattern="yyyy-MM-dd"/>' placeholder="时间"/>---%>
<%--        到<input type="date" name="end" value='<fmt:formatDate value="${end}" pattern="yyyy-MM-dd"/>' placeholder="时间"/>--%>
        <input type="submit" value="搜索"/>

        <%-- <input type="button" value="去百度" onclick="gotoBd()"/>--%>
    </div>
</form>
</p>

<div style="width:100%; height:100%; overflow:auto;">
    <table border="1" cellpadding="0" cellspacing="0" style="height: 80%;width: 140%;">
        <tr>
            <th>编号</th>
            <th>项目名称</th>
            <th>项目类型</th>
            <th>专家人数</th>
            <th>项目状态</th>
            <th>采购方式</th>
            <th>采购部门id</th>
            <th>预算</th>
            <th>采购公告时间</th>
            <th>开标时间</th>
            <th>开标地点</th>
            <th>成交公告时间</th>
            <th>公告发布网址</th>
            <th>成交单位</th>
            <th>成交价格</th>
            <th>项目联系人姓名</th>
            <th>项目联系人电话</th>
            <th>项目文件路径</th>
            <th>创建者</th>
            <th>创建时间</th>
            <th>采购部门</th>
            <th>修改者</th>
            <th>更新时间</th>
            <th>报到时间</th>
            <th>报到地点</th>
            <th>评标委员会组成人数</th>
            <th>采购代表</th>
            <th>完成状态</th>
            <th>操作</th>
        </tr>

        <c:forEach items="${page.data}" var="p">
            <tr>
                <td>${p.id}</td>
                <td>${p.projectName}</td>
                <td>${p.projectCategory}</td>
                <td>${p.professorNum}</td>
                <td>${p.isEvaluated}</td>
                <td>${p.prochaseMode}</td>
                <td>${p.departmentId}</td>
                <td>${p.budget}</td>
                <td><fmt:formatDate value="${p.announceDate}" pattern="yyyy年MM月dd日"/></td>
                <td><fmt:formatDate value="${p.openDate}" pattern="yyyy年MM月dd日"/></td>
                <td>${p.address}</td>
                <td><fmt:formatDate value="${p.dealDate}" pattern="yyyy年MM月dd日"/></td>
                <td>${p.url}</td>
                <td>${p.dealCompany}</td>
                <td>${p.settlePrice}</td>
                <td>${p.linkMan}</td>
                <td>${p.mobliePhone}</td>
                <td><c:if test="${not empty p.projectFilePath}">
                <%-- <a href="files/${p.projectFilePath}" target="_blank">下载</a>--%>
                <a href="download.project?id=${p.id}" target="_blank">下载</a>
            </c:if></td>
                <td>${p.createBy}</td>
                <td><fmt:formatDate value="${p.createDate}" pattern="yyyy年MM月dd日"/></td>
                <td>${p.department}</td>
                <td>${p.updateBy}</td>
                <td><fmt:formatDate value="${p.updateDate}" pattern="yyyy年MM月dd日"/></td>
                <td><fmt:formatDate value="${p.registerTime}" pattern="yyyy年MM月dd日"/></td>
                <td>${p.registerAddress}</td>
                <td>${p.committee}</td>
                <td>${p.professional}</td>
                <td>${p.status}</td>
                <td>
                    <a onclick="return confirm('真的要删除码？')" href="del.project?id=${p.id}">删除</a>
                    <a href="toUpdate.project?id=${p.id}">修改</a>
                    <a href="show.project?id=${p.id}">查看</a>
                    <a href="xxxx.project?id=${p.id}">定标</a>
                    <c:if test="${p.isEvaluated=='1' || p.isEvaluated=='2'||p.isEvaluated=='3'}">
                        <a href="show.project?id=${p.id}">抽取专家</a>
                    </c:if>
                    <a href="exportToWord.project?id=${p.id}">导出为word</a>
                </td>
            </tr>
        </c:forEach>
    </table>
    <p style="text-align: center ;height:20%;">
        <a href="search.project?pageNo=1&projectName=${project2.projectName}&projectCategory=${project2.projectCategory}&isEvaluated=${project2.isEvaluated}&registerAddress=${project2.registerAddress}">第一页</a>
        <c:if test="${page.pageNo>1}">
            <a href="search.project?pageNo=${page.pageNo-1}&projectName=${project2.projectName}&projectCategory=${project2.projectCategory}&isEvaluated=${project2.isEvaluated}&registerAddress=${project2.registerAddress}">上一页</a>
        </c:if>

        <input style="width:40px" value="${page.pageNo}" type="number" id="go" name="goto" min="1" max="${page.pageNums}"/>
        <input type="button" value="Go" onclick="gotoPage()"/>

        <c:if test="${page.pageNo<page.pageNums}">
            <a href="search.project?pageNo=${page.pageNo+1}&projectName=${project2.projectName}&projectCategory=${project2.projectCategory}&isEvaluated=${project2.isEvaluated}&registerAddress=${project2.registerAddress}">下一页</a>
        </c:if>
        <a href="search.project?pageNo=${page.pageNums}&projectName=${project2.projectName}&projectCategory=${project2.projectCategory}&isEvaluated=${project2.isEvaluated}&registerAddress=${project2.registerAddress}">最后一页</a>
    </p>
</div>





<script>
    function gotoPage() {
        let p=document.getElementById("go").value;
        window.location="search.project?pageNo="+p+"&projectName=${project2.projectName}&projectCategory=${project2.projectCategory}&isEvaluated=${project2.isEvaluated}&registerAddress=${project2.registerAddress}";
    }
</script>
</body>
</html>
